package com.example.test06thread.test;

public class test2 {
    public static class C1 extends Thread{
        public void run(){
            for(int i = 0;i<1000;i++){
                try {
                    Thread.sleep(1);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("C1================="+i);
            }
        }

    }

    public static class C2 extends Thread{
        public void run(){
            for(int i = 0;i<1000;i++){
                try {
                    Thread.sleep(1);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println("C2================="+i);
            }
        }

    }

    public static void main(String[] args) {
        C1 c1 = new C1();
        C2 c2 = new C2();
        c1.start();
        c2.start();
    }
}
